home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
By Popular Request 2.0
/
By Popular Request 2.0 (Arsenal Computer).ISO
/
amiga_6
/
tiffdtyp.lha
/
sources
/
TIFF.h
< prev
next >
Wrap
C/C++ Source or Header
|
1995-03-26
|
4KB
|
138 lines
/* Miscellaneous definitions */
/* Compression */
#define NO_COMPRESSION 1
#define HUFFMAN 2
#define GROUP3 3
#define GROUP4 4
#define LZW 5
#define PACKBITS 32773
/* NewSubfileType */
#define REDUCED (1<<0)
#define MULTIPAGE (1<<1)
#define TRASPARENT_MASK (1<<2)
/* SubfileType */
#define FULL_RESOLUTION 1
#define REDUCED_RESOLUTION 2
#define MULTI_PAGE 3
/* PhotometricInterpretation */
#define BILEVEL_ZERO_IS_WHITE 0
#define BILEVEL_ZERO_IS_BLACK 1
#define TRUE_COLOR_RGB 2
#define COLOR_MAPPED_RGB 3
#define TRASPARENCY_MASK 4
/* PlanarConfiguration */
#define CHUNKY 1
#define PLANAR 2
/* Predictor */
#define NO_PREDICTOR 1
#define HORIZONTAL_DIFFERENCING 2
/* ResolutionUnit */
#define NO_UNIT 1
#define INCH 2
#define CENTIMETER 3
/* Group3Options */
#define BIDIMENSIONAL (1<<0)
#define UNCOMPRESSSED (1<<1)
#define FILLBITS (1<<2)
/* FillOrder */
#define MSB_FIRST 1
#define LSB_FIRST 2
/* Orientation */
#define TOPLEFT 1
#define TOPRIGHT 2
#define BOTTOMRIGHT 3
#define BOTTOMLEFT 4
#define LEFTTOP 5
#define RIGHTTOP 6
#define LEFTBOTTOM 7
#define RIGHTBOTTOM 8
/* Threshholding */
#define LINE_ART 1
#define DITHERED 2
#define ERROR_DIFFUSED 3
typedef struct Rational {
unsigned long Numerator;
unsigned long Denominator;
} rational;
/* TIFF structures */
typedef struct TBF {
unsigned char GrayResponseUnit; /* Scale for intensity values */
unsigned char NewSubfileType; /* Special flags */
unsigned char PhotometricInterpretation; /* Image type */
unsigned char PlanarConfiguration; /* Image data organization */
unsigned char Predictor; /* LZW predictor */
unsigned char ResolutionUnit; /* Unit length for XResolution and YResolution */
unsigned char SamplesPerPixel; /* Color components */
unsigned short Compression; /* Compression type */
unsigned short BitsPerSample[8]; /* Bits per component (e.g. RGB, YCMK etc.) */
unsigned short *ColorMap; /* Pointer to an array of RGB values */
unsigned short *ColorResponseCurves; /* Pointer to an array of RGB values */
unsigned short *GrayResponseCurve; /* Pointer to an array of intensity values */
unsigned long ImageLength; /* Image height */
unsigned long ImageWidth; /* Image width */
unsigned long RowsPerStrip; /* Strip height */
unsigned long *StripByteCounts; /* Bytes in a strip */
unsigned long *StripOffsets; /* Strips offsets from BOF */
rational XResolution,YResolution;/* Image absolute dimension */
} TIFFBasicFields;
#define TBFSIZE (sizeof (struct TBF))
typedef struct TIF {
char *Artist;
char *HostComputer;
char *ImageDescription;
char *Make,*Model;
char *Software;
char DateTime[20];
} TIFFInformationFields;
#define TIFSIZE (sizeof (struct TIF))
typedef struct TFF {
unsigned char Group3Options; /* flags for group 3 compression */
unsigned char Group4Options; /* flags for group 4 compression */
} TIFFFaxFields;
#define TFFSIZE (sizeof (struct TFF))
typedef struct TDSRF {
char *DocumentName;
char *PageName;
unsigned char Threshholding;
unsigned char Orientation;
unsigned short CellLength;
unsigned short CellWidth;
unsigned short FillOrder;
unsigned short PageNumber[2];
unsigned short MaxSampleValue[8];
unsigned short MinSampleValue[8];
unsigned long *FreeByteCounts;
unsigned long *FreeOffsets;
rational XPosition,YPosition;
} TIFFDocumentFields;
#define TDRSFSIZE (sizeof (struct TDRSF))
typedef struct TIFH {
unsigned short ByteOrder;
unsigned short Version;
unsigned long Offset;
} TIFFImageFileHeader;
#define TIFHSIZE (sizeof (struct TIFH))